package com.niiwoo.civet.account.dto.request;


import com.niiwoo.civet.account.enums.BillSecondSubjectEnum;
import com.niiwoo.civet.account.enums.BillUserTypeEnum;
import com.niiwoo.civet.account.enums.InoutTypeEnum;
import com.niiwoo.civet.base.enums.ChannelCodeEnum;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 添加第三方账单请求对象
 */
@Getter
@Setter
@ToString
public class AddThirdBillRequestDTO implements Serializable {

    /**
     * 用户ID
     */
    private String userId;
    /**
     * 账单类型
     */
    private BillUserTypeEnum billType;
    /**
     * 请求流水号
     */
    private String requestNo;
    /**
     * 账单金额(正数或0)
     */
    private BigDecimal amount;
    /**
     * 收支类型
     */
    private InoutTypeEnum inoutType;
    /**
     * 项目ID
     */
    private Long projectId;
    /**
     * 投放渠道
     */
    private ChannelCodeEnum channelCodeEnum;
    /**
     * 账单备注
     */
    private String remark;
    /**
     * 账单明细List
     */
    private List<BillDetail> billDetailList;



    public BillDetail genertBillDetailInstance(){
        return new BillDetail();
    }


    @Getter
    @Setter
    @ToString
    public class BillDetail implements Serializable{
        /**
         * 账单明细金额
         */
        private BigDecimal amount;

        /**
         * 账单二级科目枚举
         */
        private BillSecondSubjectEnum billSecondSubjectEnum;

        /**
         * 关联用户ID
         */
        private String relationUserId;

        /**
         * 当前期数：借款用户还款-投资用户收款必传此字段 非必传
         */
        private Integer currentPeriod;

    }

}
